package com.schoolcloud.share.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * 评论系统
 * @TableName comments
 */
@TableName(value ="comments")
@Data
public class Comments implements Serializable {
    /**
     * 评论ID
     */
    @TableId(value = "comment_id", type = IdType.AUTO)
    private Integer commentId;

    /**
     * 评论者ID
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 评论内容
     */
    @TableField(value = "content")
    private String content;

    /**
     * 评论目标类型
     */
    @TableField(value = "target_type")
    private Integer targetType;

    /**
     * 评论目标ID
     */
    @TableField(value = "target_id")
    private Integer targetId;

    /**
     * 父评论ID
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 点赞数
     */
    @TableField(value = "like_count")
    private Integer likeCount;

    /**
     * 状态
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 评论时间
     */
    @TableField(value = "created_time")
    private LocalDateTime createTime;

    @Serial
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
